<template>
  <div class="shop-home">
    <div class="shop-home-search">
      <van-search v-model="value" placeholder="点击前往搜索" />
    </div>
    <Banner ref="banner"></Banner>
    <Nav ref="nav"></Nav>
    <div class="shop-home-team pd10 flex_sb">
      <span>团购专区</span>
      <span class="font-999">更多团购商品></span>
    </div>
    <Brand ref="brand"></Brand>
    <New ref="new"> </New>
    <Hot ref="hot"></Hot>
    <Theme ref="theme"></Theme>
  </div>
</template>

<script>
import Banner from "./homeBanner.vue";
import Nav from "./homeNav.vue";
import Brand from "./homeBrand.vue";
import New from "./homeNew.vue";
import Hot from "./homeHot.vue";
import Theme from "./homeTheme.vue";
import { homeapi } from "../../assets/api/homeapi.js";

export default {
  components: {
    Banner,
    Nav,
    Brand,
    New,
    Hot,
    Theme,
  },
  data() {
    return {
      images: [],
    };
  },
  created() {
    homeapi().then((res) => {
      // console.log(res.data.data);
      this.$refs.banner.images = res.data.data.banner;
      this.$refs.nav.navList = res.data.data.channel;
      this.$refs.brand.brandList = res.data.data.brandList;
      this.$refs.new.newList = res.data.data.newGoodsList;
      this.$refs.hot.hotList = res.data.data.hotGoodsList;
      this.$refs.theme.themeList = res.data.data.topicList;
    });
  },
};
</script>

<style lang="scss" scoped>
.shop-home-team {
  height: 15px;
  line-height: 15px;
  margin-top: 20px;
  background-color: white;
}
.in {
  border-radius: 20px;
}
</style>

